import './../sass/login.scss';
import $ from './jquery.min.js';
$(() => {
    $("#btn-login").on('click',function() {
        const username = $("#username").val();
        const password = $("#password").val();
        $.ajax({
            url: '/Users/login',
            data: {
                username,
                password
            },
            type: 'post',
            success({message,status,token,user}) {
                console.log(message);
                localStorage.token = token;
                location.assign("./../html/index.html");
            }
        })
    })
})